#ifndef GAME_H
#define GAME_H

#include "card.h"
#include <QWidget>
#include <QPainter>
#include <QPixmap>
#include <QRandomGenerator>

namespace Ui {
class Game;
}

class Game : public QWidget
{
    Q_OBJECT

public:
    explicit Game(QWidget *parent = nullptr);
    ~Game();

    void paintEvent(QPaintEvent *ev);

private slots:
    void getObject(Card *w);
private:
    Ui::Game *ui;
    Card* cd[8];
    Card *temp;
    QPoint startP;
    QPoint yuanP;

protected:
    void mouseMoveEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;


};

#endif // GAME_H
